A cache manager may be a process or component for tracking files that are entered into cache of a device, and/or for purging files from the cache according to one or more cache eviction policies. The cache manager may operate independent of one or more other processes of the device that serve requested files in response to user requests, and/or enter the requested files into cache.
Synchronous operation may exist between the cache manager and other caching processes so that the cache manager can have an up-to-date view of what is in cache. For instance, a process may generate an inter-process communication (“IPC”) message for conveying to the cache manager each file that is newly entered to cache as a result of a cache miss and/or that is served from cache as a result of a cache hit. The IPC messages may be entered in a queue. Cache manager may update its tracking of files in cache based on the IPC messages.
In a device that receives a high frequency and/or a high volume of requests, the rate at which the IPC messages are generated and entered in the IPC queue may exceed the rate at which the cache manager processes the IPC messages. The IPC message queue may overflow, thereby causing the cache manager to lose track of one or more files that were entered into cache and/or that were requested from cache. The cache manager may also lose track of cached files when the cache manager is unavailable because of a failure, restart, and/or other issue, and one or more other processes of the device continue to add file to and/or remove files from the device cache.
Upon losing track of some cached files, the cache manager may be unable to designate and/or remove those files from cache. Consequently, some files may remain permanently in cache, may reduce the overall cache footprint of the device, and/or may affect the cache-hit ratio of the device. To prevent the tracking issues from impacting the device, the device may be periodically reset, its entire cache may be purged, and the device may then be brought back online. The emptied cache would cause the device to experience a large number of cache misses for a period of time, and to provide poor performance as the cache is repopulated.